using DiLu.Expansion.File.Configs;

namespace DiLu.Expansion.File.Operates.LocalDisk.Configs;

/// <summary>
///     本地磁盘文件搜索配置
/// </summary>
public record SearchLocalDiskFileConfig : SearchFileConfig
{
    /// <summary>
    ///     本地磁盘文件搜索配置
    /// </summary>
    /// <param name="directoryFullPath">目录完整路径</param>
    /// <param name="searchOption">搜索选项</param>
    /// <param name="containsHideFile">包含隐藏文件</param>
    /// <param name="searchPattern">
    ///     模糊查询模式，* 表示匹配所有文件
    ///     如果想查询指定类型文件使用 *.png  *.txt...
    ///     如果想模糊查询文件使用  *name*.*
    /// </param>
    public SearchLocalDiskFileConfig(string directoryFullPath,
        SearchOption searchOption = SearchOption.TopDirectoryOnly, bool containsHideFile = false, string searchPattern = "*")
        : base(directoryFullPath, searchOption, searchPattern)
    {
        ContainsHideFile = containsHideFile;
    }

    /// <summary>
    ///     本地磁盘文件搜索配置
    /// </summary>
    /// <param name="rootDirectory">根目录</param>
    /// <param name="fileGroupName">文件分组名称</param>
    /// <param name="directoryRelativePath">目录相对路径</param>
    /// <param name="searchOption">搜索选项</param>
    /// <param name="containsHideFile">包含隐藏文件</param>
    /// <param name="searchPattern">
    ///     模糊查询模式，* 表示匹配所有文件
    ///     如果想查询指定类型文件使用 *.png  *.txt...
    ///     如果想模糊查询文件使用  *name*.*
    /// </param>
    public SearchLocalDiskFileConfig(string rootDirectory, string fileGroupName, string directoryRelativePath,
        SearchOption searchOption = SearchOption.TopDirectoryOnly, bool containsHideFile = false, string searchPattern = "*")
        : base(rootDirectory, fileGroupName, directoryRelativePath, searchOption, searchPattern)
    {
        ContainsHideFile = containsHideFile;
    }

    /// <summary>
    ///     包含隐藏文件
    /// </summary>
    public bool ContainsHideFile { get; }
}